package com.partybuilding.Controller;

import com.partybuilding.domain.ResponseResult;
import com.partybuilding.domain.entity.Usertable;
import com.partybuilding.service.PartytableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@ResponseBody
@RequestMapping("/Party")
public class PartyController {

    @Autowired
    private PartytableService partytableService;


    @GetMapping("/getAllUserByPartyId/{partyid}")
    public ResponseResult getAllUserByPartyId(@PathVariable("partyid") String partyId){
        ResponseResult result=partytableService.getAllUserByPartyId(partyId);
        return result;
    }
    @GetMapping("/getAllUserByPartyName/{partyname}")
    public ResponseResult getAllUserByPartyName(@PathVariable("partyname") String partyName){
        ResponseResult result=partytableService.getAllUserByPartyName(partyName);
        return result;
    }

    @GetMapping("/getPartyByPartyName/{partyname}")
    public ResponseResult getPartyByPartyName(@PathVariable("partyname") String partyName){
        ResponseResult result=partytableService.getPartyByPartyName(partyName);
        return result;
    }


}
